package com.szxy.hotel.service;

import com.szxy.hotel.entity.Hotelroom;
import com.szxy.hotel.entity.Room;
import com.szxy.hotel.mapper.HotelroomMapper;
import com.szxy.hotel.mapper.RoomMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("roomstatusService")
public class RoomstatusService {
    @Resource
    RoomMapper roomMapper;
    @Resource
    HotelroomMapper hotelroomMapper;

    public List<Hotelroom> findByPage(int start, int size, String hotelState1, String hotelState2) {
        return hotelroomMapper.findByPage(start,size,hotelState1,hotelState2);
    }

    public List<Hotelroom> selectCount(String hotelState1, String hotelState2) {
        return hotelroomMapper.selectCount(hotelState1,hotelState2);
    }

    public List<Room> findByPage1(int start, int size, String roomState1, String roomState2) {
        return roomMapper.findByPage1(start,size,roomState1,roomState2);
    }

    public List<Room> selectCount1(String roomState1, String roomState2) {
        return roomMapper.selectCount1(roomState1,roomState2);
    }

    public List<Room> findByPage2(int start, int size, String roomState, String roomType) {
        return roomMapper.findByPage2(start,size,roomState,roomType);
    }

    public List<Room> selectCount2(String roomState, String roomType) {
        return roomMapper.selectCount2(roomState,roomType);
    }
}
